package com.sq.orders.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sq.orders.service.OrdersService;
import com.sq.orders.vo.R;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;


/**
 * (Orders)表控制层
 *
 * @author 全哥哥
 * @since 2025-05-13 10:40:03
 */
@RestController
@RequestMapping("orders")
public class OrdersController {
    /**
     * 服务对象
     */
    @Resource
    private OrdersService ordersService;


    @GetMapping
    public R selectAll() {
        return R.success(ordersService.myList());
    }


    @GetMapping("{id}")
    public R selectOne(@PathVariable Serializable id) {
        return R.success(ordersService.myGetById(id));
    }


}

